package businesslogic.chooseCourseBl;

import java.util.ArrayList;

import po.chooseCoursePO.ChooseCoursePO;
import vo.chooseCourseVO.ChooseCourseVO;
import vo.courseVO.CourseVO;
import vo.userVO.StudentVO;
import businesslogicservice.chooseCourseblservice.ChooseCourseBLService;
import dataservice.ResultMessage;

public class ChooseCourseController implements ChooseCourseBLService{
	
	private String userId;
	public static final int MAX_CHOOSE_NUM=4;
	public static final int NOW_TERM=3;
	
	ChooseCourseBLService chooseCourse;
	
	public ChooseCourseController(String userId){
		this.userId=userId;
		chooseCourse=new ChooseCourse(userId);
	}
	

	@Override
	public ArrayList<ChooseCourseVO> getAllChooseCourseRecord() throws Exception {
		return chooseCourse.getAllChooseCourseRecord();
	}

	@Override
	public ArrayList<StudentVO> getStuList(String courseId) throws Exception {
		return chooseCourse.getStuList(courseId);
	}

	@Override
	public ResultMessage chooseCourse(ArrayList<CourseVO> courseVOs, StudentVO vo2) throws Exception {
		return chooseCourse.chooseCourse(courseVOs, vo2);
	}

	@Override
	public ResultMessage deleteAChooseCourse(ChooseCourseVO vo) throws Exception {
		return chooseCourse.deleteAChooseCourse(vo);
	}

	@Override
	public ResultMessage setScore(ChooseCourseVO vo, double score) throws Exception {
		return chooseCourse.setScore(vo, score);
	}

	@Override
	public double getScore(ChooseCourseVO vo) throws Exception {
		return chooseCourse.getScore(vo);
	}


	@Override
	public ArrayList<CourseVO> getMyCourse() throws Exception {
		return chooseCourse.getMyCourse();
	}


	@Override
	public ArrayList<ChooseCourseVO> getChooseCourseByTerm(int term) throws Exception {
		return chooseCourse.getChooseCourseByTerm(term);
	}


	@Override
	public void CalculateGPA(String department) throws Exception  {
		chooseCourse.CalculateGPA(department);
		
	}


	@Override
	public ArrayList<ChooseCourseVO> getDeleteChooseCourseRecord()
			throws Exception {
		return chooseCourse.getDeleteChooseCourseRecord();
	}


	@Override
	public ArrayList<ChooseCourseVO> getAllStudentChoose() throws Exception {
		return chooseCourse.getAllStudentChoose();
		
	}


	@Override
	public ArrayList<ChooseCourseVO> sortChooseCourse() throws Exception {
		return chooseCourse.sortChooseCourse();
		
	}


	@Override
	public ArrayList<CourseVO> getMyDeleteCourse() throws Exception {
		return chooseCourse.getMyDeleteCourse();
	}


	@Override
	public ResultMessage chooseCourseDirect(ChooseCourseVO chooseCourseVO)
			throws Exception {
		return chooseCourse.chooseCourseDirect(chooseCourseVO);
	}


	@Override
	public ArrayList<CourseVO> getMyTemp() throws Exception {
		return chooseCourse.getMyTemp();
	}
	

}
